<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ page import="org.apache.struts.validator.Resources" %>
<script language="javascript">

function onClickCancel(theForm) {
  theForm.action.value = "CANCEL";
  theForm.submit();
}

function onClickStartTask(theForm) {
  theForm.action.value = "LAUNCH";
  theForm.exitURL.value = "/loginPage.do";
  theForm.submit();
}

</script>



<jsp:useBean id="processTaskForm"
          class="com.broadvision.bpmapp.action.ProcessTaskForm"
          scope ="request"/>

<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" summary="content area">
 <tr>
   <td valign="top" >
    
     <div class="app_pageTitle">
       <span class="left"><bean:message bundle="appCommonRes" key="bp.manualTask.processTaskDetails" /></span>
     </div> 

     <div class="app_pageSubtitle">
       <span class="left"><bean:message bundle="appCommonRes" key="bp.manualTask.processTaskDetails" /></span>
     </div> 
     
		 <div class="blockWrap">
		  
     <table class="labelForm" width="100%" border="0" cellspacing="0" cellpadding="0" summary="Account information">
       <tr> 
         <td class="label" width="20%"><bean:message bundle="appCommonRes" key="bp.name" />:</td>
         <td class="labelField" width="80%"><bean:write name="processTaskForm" property="name" /></td>
       </tr>
       <tr> 
         <td class="label" width="20%"><bean:message bundle="appCommonRes" key="bp.minorName" />:</td>
       <td class="labelField" width="80%"><bean:write name="processTaskForm" property="minorName" /></td>
       </tr>
       <tr> 
         <td class="label" width="20%"><bean:message bundle="appCommonRes" key="bp.dueDate" />:</td>
        <td class="labelField" width="80%">
          <bean:write name="processTaskForm" property="dueDate" formatKey="format.datetime.full" />
        </td>
      </tr>
      <tr> 
       <td class="label" width="20%"><bean:message bundle="appCommonRes" key="bp.priority" />:</td>
       <td class="labelField" width="80%">
           <bean:define id="processTaskpriority" name="processTaskForm" property="priority"/>
      <% String  priority = (String )pageContext.getAttribute("processTaskpriority"); %>
      <%=  Resources.getMessage(request,priority) == null ? priority : Resources.getMessage(request,priority) %>
       </td>
     </tr>
     <tr> 
       <td class="label" width="20%"><bean:message bundle="appCommonRes" key="bp.processInstance.search.processName" />:</td>
       <td class="labelField" width="80%">
         <bean:write name="processTaskForm" property="processName" />
       </td>
     </tr>
     <tr> 
       <td class="label" width="20%"><bean:message bundle="appCommonRes" key="bp.processInstance.search.processInstanceName" />:</td>
       <td class="labelField" width="80%">
         <bean:write name="processTaskForm" property="processInstanceName" />
       </td>
     </tr>
     <tr> 
       <td class="label" width="20%"><bean:message bundle="appCommonRes" key="bp.instructions" />:</td>
       <td class="labelField" width="80%">
        <bean:write name="processTaskForm" property="instructions" />
       </td>
     </tr>
   </table>

   <html:form action="/processTask.do" method="post">

     <div class="pageButtonWrap" align="right">

       <input type="hidden" name="task_id" value='<bean:write name="processTaskForm" property="taskID" />' >
       <input type="hidden" name="action">
       <input type="hidden" name="hostPage" value="/loginPage.do" >
       <input type="hidden" name="exitURL">

       <input type="button" class="pageButton" name="cancelBtn"
              value='<bean:message bundle="appCommonRes" key="button.cancel"/>'
              onClick="onClickCancel(this.form)">

       <input type="button" class="pageButton" name="startTaskBtn"
              value='<bean:message bundle="appCommonRes" key="button.startTask" />'
              onClick="onClickStartTask(this.form)">
              
      </div>
    </html:form>
    </div>
 </td>
</tr>
</table>

